﻿using Prism.Mvvm;
using Prism.Navigation.Regions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RoboAssembleX.ViewModels
{
    public class WinMainViewModel: BindableBase
    {
        private readonly IRegionManager regionManager;
        public event Action RequestClose;
        public WinMainViewModel(IRegionManager regionManager)
        {
            this.regionManager = regionManager;
            Init();
        }


        private void Init()
        {

            regionManager.RegisterViewWithRegion("TopRegion", "ViewTop");
            regionManager.RegisterViewWithRegion("MainRegion", "ViewMain");
            //regionManager.RegisterViewWithRegion("MainRegion", "StartView");
            //var menuRegion = this.regionManager.Regions["MenuRegion"];
            //menuRegion.RequestNavigate("MenuView");
        }
    }
}
